package org.delphy.indy2.controls
{
	import flash.display.Graphics;
	import flash.events.Event;
	
	import mx.controls.ColorPicker;
	
	public class CarbonColorPicker extends ColorPicker
	{
			[Bindable]
			private var _skinColor:Number;
			
			public function get skinColor():Number{
				return _skinColor;
			}
			public function set skinColor(value:Number):void{
				if(_skinColor!=value){
					_skinColor=value;
					setStyle("skinColor",value);
					invalidateDisplayList();
				}
			}
		
		
		public function CarbonColorPicker()
		{
			super();
			
			styleName="carbonColorPicker";
			
			addEventListener(Event.CHANGE,onColorChange);
		}
		
		private function onColorChange(evt:Event):void{
			setStyle("skinColor",selectedColor);
		}
		
	}
}